Skip to content

Conversation

@robertcsakany
Copy link
Member

JNG-6322 Minimize karaf

@robertcsakany robertcsakany marked this pull request as ready for review August 18, 2025 16:39
@robertcsakany robertcsakany self-assigned this Aug 18, 2025
@coderabbitai
Copy link

coderabbitai bot commented Aug 18, 2025

Walkthrough

Project-wide build updates add judo-tatami-util and bump versions in the root POM. Multiple modules add the new util dependency. Code updates replace static imports from core.TransformationTraceUtil to util.TransformationTraceExtractor. Expression validation adapters switch from “Epsilon” validators to new validators with simplified method signatures in ASM and PSM validation modules.

Changes

Cohort / File(s) Summary
Root POM version updates and util introduction
pom.xml
Bumped multiple dependency properties to 20250818 feature builds; introduced judo-tatami-util property; added judo-tatami-util to dependencies and dependencyManagement.
Add judo-tatami-util to module POMs
judo-tatami-asm2keycloak/pom.xml, judo-tatami-asm2rdbms/pom.xml, judo-tatami-psm2asm/pom.xml, judo-tatami-psm2measure/pom.xml
Added compile-time dependency on hu.blackbelt.judo.tatami:judo-tatami-util; no other dependency changes.
PSM validation runtime dep
judo-tatami-psm-validation/pom.xml
Added runtime dependency hu.blackbelt.epsilon:epsilon-runtime-execution.
Trace extractor import migration (keycloak)
.../asm2keycloak/Asm2Keycloak.java, .../asm2keycloak/Asm2KeycloakTransformationTrace.java
Replaced static imports from core.TransformationTraceUtil to util.TransformationTraceExtractor; usages unchanged.
Trace extractor import migration (rdbms)
.../asm2rdbms/Asm2Rdbms.java, .../asm2rdbms/Asm2RdbmsTransformationTrace.java
Same static import relocation to util.TransformationTraceExtractor; no logic change.
Trace extractor import migration (psm2asm)
.../psm2asm/Psm2Asm.java, .../psm2asm/Psm2AsmTransformationTrace.java
Same static import updates; behavior unchanged.
Trace extractor import migration (psm2measure)
.../psm2measure/Psm2Measure.java, .../psm2measure/Psm2MeasureTransformationTrace.java
Same static import updates; behavior unchanged.
Expression validator API change (ASM)
.../expression/asm/validation/ExpressionValidationOnAsmWork.java
Switched from ExpressionEpsilonValidatorOnAsm.validateExpressionOnAsm(logger, ..., scriptUri) to ExpressionValidatorOnAsm.validateExpressionOnAsm(logger, ...); removed script URI usage; updated imports.
Expression validator API and logging change (PSM)
.../expression/psm/validation/ExpressionValidationOnPsmWork.java
Switched from ExpressionEpsilonValidatorOnPsm to ExpressionValidatorOnPsm with 3-arg method; removed script URI and its calculation; updated logging to Lombok @slf4j; adjusted imports.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

I twitch my ears at version chimes,
New Util hops through POM-y lines.
Traces leap from core to “util” nest,
Validators trim their script-y rest.
Carrots compiled, the builds delight—
A tidy warren, green-lit night.
(thump-thump) All dependencies tight! 🥕✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/JNG-6322_Minimiize_Karaf_Size

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (8)
judo-tatami-expression-asm-validation/src/main/java/hu/blackbelt/judo/tatami/expression/asm/validation/ExpressionValidationOnAsmWork.java (1)

45-51: Fix minor grammar in exception messages

Tweak the messages for clarity and professionalism.

-        expressionModel.orElseThrow(() -> new IllegalArgumentException("Expression Model does not found in transformation context"));
+        expressionModel.orElseThrow(() -> new IllegalArgumentException("Expression Model not found in transformation context"));
...
-        measureModel.orElseThrow(() -> new IllegalArgumentException("Measure Model does not found in transformation context"));
+        measureModel.orElseThrow(() -> new IllegalArgumentException("Measure Model not found in transformation context"));
...
-        asmModel.orElseThrow(() -> new IllegalArgumentException("ASM Model does not found in transformation context"));
+        asmModel.orElseThrow(() -> new IllegalArgumentException("ASM Model not found in transformation context"));
judo-tatami-psm2asm/src/main/java/hu/blackbelt/judo/tatami/psm2asm/Psm2AsmTransformationTrace.java (5)

146-154: Fix minor Javadoc typo “wth” → “with”.

Apply:

-    /**
-     * Create PSM 2 ASM Trace model {@link Resource} wth isolated {@link ResourceSet}
+    /**
+     * Create PSM 2 ASM Trace model {@link Resource} with isolated {@link ResourceSet}

159-167: Fix Javadoc typo “resturns” → “returns”.

-    /**
-     * Resolves PSM 2 ASM Trace model {@link Resource} and resturns the trace {@link EObject } map
+    /**
+     * Resolves PSM 2 ASM Trace model {@link Resource} and returns the trace {@link EObject } map

190-199: Fix Javadoc typos “race” → “trace” and “entrie” → “entries”.

-    /**
-     * Convert race {@link EObject } map to trace:Trace model entrie.
+    /**
+     * Convert trace {@link EObject } map to trace:Trace model entries.

201-208: Fix Javadoc typo “race” → “trace”.

-    /**
-     * Convert race {@link EObject } map to trace:Trace model {@link Resource} with isolated {@link ResourceSet}.
+    /**
+     * Convert trace {@link EObject } map to trace:Trace model {@link Resource} with isolated {@link ResourceSet}.

215-223: Fix Javadoc typo “race” → “trace”.

-    /**
-     * Convert race {@link EObject } map to trace:Trace model {@link Resource} with isolated {@link ResourceSet}.
+    /**
+     * Convert trace {@link EObject } map to trace:Trace model {@link Resource} with isolated {@link ResourceSet}.
judo-tatami-asm2keycloak/src/main/java/hu/blackbelt/judo/tatami/asm2keycloak/Asm2Keycloak.java (1)

190-192: Prefer StandardCharsets over Charset.forName for UTF-8.

Minor cleanup: avoids lookup and is the standard approach.

A minimal change inside MD5Utils:

public static String md5(final String string) {
    return Hashing.md5().hashString(string, java.nio.charset.StandardCharsets.UTF_8).toString();
}
judo-tatami-asm2keycloak/src/main/java/hu/blackbelt/judo/tatami/asm2keycloak/Asm2KeycloakTransformationTrace.java (1)

55-57: Consider renaming constants to match the Keycloak context

The constant names use “RDBMS” while the values point to “asm2keycloak”. It’s non-functional but confusing when navigating code.

Suggested renames for clarity:

  • ASM_2_RDBMS_URI_POSTFIX → ASM_2_KEYCLOAK_URI_POSTFIX
  • ASM_2_RDBMS_TRACE_URI_PREFIX → ASM_2_KEYCLOAK_TRACE_URI_PREFIX
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between f1d424e and 5a7ed7a.

📒 Files selected for processing (16)
  • judo-tatami-asm2keycloak/pom.xml (1 hunks)
  • judo-tatami-asm2keycloak/src/main/java/hu/blackbelt/judo/tatami/asm2keycloak/Asm2Keycloak.java (1 hunks)
  • judo-tatami-asm2keycloak/src/main/java/hu/blackbelt/judo/tatami/asm2keycloak/Asm2KeycloakTransformationTrace.java (1 hunks)
  • judo-tatami-asm2rdbms/pom.xml (1 hunks)
  • judo-tatami-asm2rdbms/src/main/java/hu/blackbelt/judo/tatami/asm2rdbms/Asm2Rdbms.java (1 hunks)
  • judo-tatami-asm2rdbms/src/main/java/hu/blackbelt/judo/tatami/asm2rdbms/Asm2RdbmsTransformationTrace.java (1 hunks)
  • judo-tatami-expression-asm-validation/src/main/java/hu/blackbelt/judo/tatami/expression/asm/validation/ExpressionValidationOnAsmWork.java (2 hunks)
  • judo-tatami-expression-psm-validation/src/main/java/hu/blackbelt/judo/tatami/expression/psm/validation/ExpressionValidationOnPsmWork.java (2 hunks)
  • judo-tatami-psm-validation/pom.xml (1 hunks)
  • judo-tatami-psm2asm/pom.xml (1 hunks)
  • judo-tatami-psm2asm/src/main/java/hu/blackbelt/judo/tatami/psm2asm/Psm2Asm.java (1 hunks)
  • judo-tatami-psm2asm/src/main/java/hu/blackbelt/judo/tatami/psm2asm/Psm2AsmTransformationTrace.java (1 hunks)
  • judo-tatami-psm2measure/pom.xml (1 hunks)
  • judo-tatami-psm2measure/src/main/java/hu/blackbelt/judo/tatami/psm2measure/Psm2Measure.java (1 hunks)
  • judo-tatami-psm2measure/src/main/java/hu/blackbelt/judo/tatami/psm2measure/Psm2MeasureTransformationTrace.java (1 hunks)
  • pom.xml (2 hunks)
🔇 Additional comments (18)
judo-tatami-expression-asm-validation/src/main/java/hu/blackbelt/judo/tatami/expression/asm/validation/ExpressionValidationOnAsmWork.java (2)

54-57: Updated call signature (URI param removed) — confirm behavior/return contract

Change looks correct for the new API. Please confirm whether validateExpressionOnAsm still throws on validation errors. If it now returns a result (boolean or violations), we should handle it explicitly (e.g., throw when invalid, or propagate a failure).


23-23: No leftover Epsilon‐based validator references found
Ran ripgrep across the repo for ExpressionEpsilonValidatorOnAsm, calculateExpressionValidationScriptURI, and ExpressionEpsilonValidatorOnPsm—no matches returned. All old validator usages have been removed.

judo-tatami-psm-validation/pom.xml (1)

53-56: LGTM: New dependency addition is appropriate.

The addition of the epsilon-runtime-execution dependency aligns with the broader PR objectives to minimize Karaf and update epsilon runtime components across the project.

judo-tatami-asm2rdbms/src/main/java/hu/blackbelt/judo/tatami/asm2rdbms/Asm2Rdbms.java (1)

55-55: LGTM: Import migration to new utility module.

The static import has been correctly updated to use TransformationTraceExtractor from the new judo-tatami-util module instead of the previous TransformationTraceUtil from judo-tatami-core. This change maintains the same functionality while centralizing transformation trace utilities as intended by the PR.

judo-tatami-psm2asm/pom.xml (1)

128-131: LGTM: New utility dependency addition.

The addition of the judo-tatami-util dependency is consistent with the refactoring to centralize transformation trace utilities. This dependency supports the import changes from TransformationTraceUtil to TransformationTraceExtractor observed in the corresponding Java files.

judo-tatami-asm2rdbms/pom.xml (1)

187-190: LGTM: Dependency addition supports utility refactoring.

The new judo-tatami-util dependency is properly positioned and supports the migration of transformation trace utilities from judo-tatami-core to the new utility module, as evidenced by the corresponding code changes.

judo-tatami-psm2asm/src/main/java/hu/blackbelt/judo/tatami/psm2asm/Psm2Asm.java (1)

53-53: LGTM: Static import updated correctly.

The static import has been successfully migrated from hu.blackbelt.judo.tatami.core.TransformationTraceUtil to hu.blackbelt.judo.tatami.util.TransformationTraceExtractor. The method name and usage remain unchanged, maintaining functional compatibility while supporting the utility module consolidation effort.

judo-tatami-psm2measure/src/main/java/hu/blackbelt/judo/tatami/psm2measure/Psm2Measure.java (1)

50-50: ✅ Static import migration verified across modules

  • No legacy hu.blackbelt.judo.tatami.core.TransformationTraceUtil references remain.
  • Every module now imports
    getTransformationTraceFromEtlExecutionContext
    from hu.blackbelt.judo.tatami.util.TransformationTraceExtractor.

Behavior is unchanged and consistent.

judo-tatami-psm2asm/src/main/java/hu/blackbelt/judo/tatami/psm2asm/Psm2AsmTransformationTrace.java (1)

47-51: Verified dependency declaration
The judo-tatami-util dependency is present in judo-tatami-psm2asm/pom.xml (lines 128–131), so the new static imports will resolve correctly.
✅ Approved.

judo-tatami-asm2keycloak/pom.xml (1)

112-115: Dependency Addition Confirmed

  • The judo-tatami-util dependency is present in judo-tatami-asm2keycloak/pom.xml (lines 112–115).
  • No remaining references to core.TransformationTraceUtil were found in judo-tatami-asm2keycloak/src.
  • It correctly relies on the parent-managed version for centralized version control.
judo-tatami-asm2keycloak/src/main/java/hu/blackbelt/judo/tatami/asm2keycloak/Asm2Keycloak.java (1)

53-54: Static import updated and verified – no lingering references

  • Ran search for the old hu.blackbelt.judo.tatami.core.TransformationTraceUtil across judo-tatami-asm2keycloak/src and found no matches.
  • The new static import from hu.blackbelt.judo.tatami.util.TransformationTraceExtractor is correct, and the module POM includes util, so resolution will work as expected.
judo-tatami-psm2measure/src/main/java/hu/blackbelt/judo/tatami/psm2measure/Psm2MeasureTransformationTrace.java (1)

47-50: Static import migration to TransformationTraceExtractor verified

  • The judo-tatami-psm2measure/pom.xml declares a dependency on judo-tatami-util (lines 135–137).
  • No imports of hu.blackbelt.judo.tatami.core.TransformationTraceUtil remain.
  • All new static imports from hu.blackbelt.judo.tatami.util.TransformationTraceExtractor are present in both Psm2Measure.java and Psm2MeasureTransformationTrace.java.

Approving code changes.

judo-tatami-asm2rdbms/src/main/java/hu/blackbelt/judo/tatami/asm2rdbms/Asm2RdbmsTransformationTrace.java (1)

47-50: LGTM: migrated static imports to util.TransformationTraceExtractor

Method names are a drop-in replacement; no behavioral changes expected.

judo-tatami-asm2keycloak/src/main/java/hu/blackbelt/judo/tatami/asm2keycloak/Asm2KeycloakTransformationTrace.java (1)

47-50: LGTM: static imports now sourced from util.TransformationTraceExtractor

Consistent with the broader migration across modules.

judo-tatami-expression-psm-validation/src/main/java/hu/blackbelt/judo/tatami/expression/psm/validation/ExpressionValidationOnPsmWork.java (2)

25-25: Switched to new validator adapter: OK

Importing hu.blackbelt.judo.meta.expression.adapters.psm.ExpressionValidatorOnPsm aligns with the new API.


50-53: All adapter usages updated and dependency present
Validated that there are no remaining references to the old ExpressionEpsilonValidatorOnPsm/OnAsm classes, all calls use the new 3-argument validateExpressionOnPsm/OnAsm signatures, and the epsilon-runtime-execution dependency is declared in this module’s pom.xml. Ready to merge.

pom.xml (2)

87-88: All consumers of TransformationTraceExtractor are wired

Verified that every module importing hu.blackbelt.judo.tatami.util.TransformationTraceExtractor declares the new judo-tatami-util dependency in its pom.xml:

  • judo-tatami-asm2keycloak
  • judo-tatami-asm2rdbms
  • judo-tatami-psm2asm
  • judo-tatami-psm2measure

No further action required.


82-86: Sanity check complete: version properties are referenced in dependencyManagement

Verified with rg that all three feature-build properties are used in your pom.xml. Now please ensure the corresponding artifacts are published to your Maven repositories (accessible to CI and Karaf) before merging:

• pom.xml – <version>${epsilon-runtime-version}</version> at lines 416 & 422
• pom.xml – <version>${java-embedded-compiler-version}</version> at lines 404 & 410
• pom.xml – <version>${judo-tatami-core-version}</version> at line 428

Verify repository availability for:

  • hu.blackbelt.epsilon:epsilon-runtime-execution & epsilon-runtime-osgi (2.8.0.20250818_020714_e9350189_feature_JNG_6322_Minimiize_Karaf_Size)
  • hu.blackbelt:java-embedded-compiler & java-embedded-compiler-ecj (1.1.0.20250818_013736_a1c33bac_feature_JNG_6322_Minimiize_Karaf_Size)
  • hu.blackbelt.judo.tatami:judo-tatami-core (1.1.4.20250818_010038_2c4e76da_feature_JNG_6322_Minimiize_Karaf_Size)

@robertcsakany robertcsakany merged commit f3decbf into develop Aug 19, 2025
3 checks passed
@robertcsakany robertcsakany deleted the feature/JNG-6322_Minimiize_Karaf_Size branch August 19, 2025 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants